using System.ComponentModel.DataAnnotations.Schema;

namespace Contoso_University_Web.Models
{
    public class Course
    {
        /// <summary>
        /// DatabaseGenerated 属性将在后面的教程部分中介绍。 该属性允许为课程输入 PK，而不是让数据库生成 PK
        /// </summary>
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public int CourseID { get; set; }
        public string Title { get; set; }
        public int Credits { get; set; }
        public ICollection<Enrollment>Enrollments { get; set; }
    }
}
